package com.hurr.service.impl;

import java.util.Collection;

import com.hurr.bo.Role;
import com.hurr.dao.RoleDao;
import com.hurr.service.RoleService;

/**
 * Implemetation for Role Service
 * 
 * @author Fernando Perelli
 * 
 */
public class RoleServiceImpl implements RoleService {

	/**
	 * Dao for role
	 */
	private RoleDao roleDao;

	/**
	 * Set RoleDao
	 * 
	 * @param roleDao
	 */
	public void setRoleDao(RoleDao roleDao) {
		this.roleDao = roleDao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.RoleService#save(com.hurr.bo.Role)
	 */
	@Override
	public Role save(Role role) {
		return roleDao.save(role);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.RoleService#update(com.hurr.bo.Role)
	 */
	@Override
	public void update(Role role) {
		roleDao.update(role);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.RoleService#delete(com.hurr.bo.Role)
	 */
	@Override
	public void delete(Role Role) {
		roleDao.delete(Role);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.RoleService#findById(java.lang.Long)
	 */
	@Override
	public Role findById(Long id) {
		return roleDao.findById(id);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.RoleService#findAll()
	 */
	@Override
	public Collection<Role> findAll() {
		return roleDao.findAll();
	}

}
